VERSION = 1.0.0.221218

QT += widgets gui-private

TEMPLATE = lib
DEFINES += QTE_VIRTUALKEYBOARD_LIBRARY

TARGET = qtevirtualkeyboardplugin

include(../QTEPlugins.pri)

SOURCES += \
	pluginMain.cpp \
	jinputcontext.cpp \
	qtevirtualkeyboardglobal.cpp \
	widgets/jvkbutton.cpp \
	keyboard/jinputcontextwidget.cpp \
	keyboard/jpanelmanager.cpp \
	keyboard/jkeyboardwidget.cpp \
	inputmethod/jpanelfactory.cpp \
	inputmethod/jabstractinputpanel.cpp \
	inputmethod/jabstractinputpanel_p.cpp \
	inputmethod/jabstractcandidatepanel.cpp \
	inputmethod/generalenglish/jenglishcandidatepanel.cpp \
	inputmethod/generalenglish/jgeneralenglishinputpanel.cpp \
	inputmethod/generalenglish/jgeneralsymbolinputpanel.cpp \
	inputmethod/chinese/jabstractchinesepanel.cpp \
	inputmethod/chinese/jchineseinputpanel.cpp \
	inputmethod/chinese/jchinesesymbolinputpanel.cpp \
	inputmethod/chinese/jsimplifiedchinesecandidatepanel.cpp \
	inputmethod/chinese/jgooglepinyin.cpp \
	inputmethod/chinese/GooglePinYin/dictbuilder.cpp \
	inputmethod/chinese/GooglePinYin/dictlist.cpp \
	inputmethod/chinese/GooglePinYin/dicttrie.cpp \
	inputmethod/chinese/GooglePinYin/lpicache.cpp \
	inputmethod/chinese/GooglePinYin/matrixsearch.cpp \
	inputmethod/chinese/GooglePinYin/mystdlib.cpp \
	inputmethod/chinese/GooglePinYin/ngram.cpp \
	inputmethod/chinese/GooglePinYin/pinyinime.cpp \
	inputmethod/chinese/GooglePinYin/searchutility.cpp \
	inputmethod/chinese/GooglePinYin/spellingtable.cpp \
	inputmethod/chinese/GooglePinYin/spellingtrie.cpp \
	inputmethod/chinese/GooglePinYin/splparser.cpp \
	inputmethod/chinese/GooglePinYin/sync.cpp \
	inputmethod/chinese/GooglePinYin/userdict.cpp \
	inputmethod/chinese/GooglePinYin/utf16char.cpp \
	inputmethod/chinese/GooglePinYin/utf16reader.cpp

HEADERS += \
	pluginMain.h \
	jinputcontext.h \
	qtevirtualkeyboardglobal.h \
	widgets/jvkbutton.h \
	keyboard/jinputcontextwidget.h \
	keyboard/jpanelmanager.h \
	keyboard/jkeyboardwidget.h \
	inputmethod/jpanelfactory.h \
	inputmethod/jabstractinputpanel.h \
	inputmethod/jabstractinputpanel_p.h \
	inputmethod/jabstractcandidatepanel.h \
	inputmethod/generalenglish/jenglishcandidatepanel.h \
	inputmethod/generalenglish/jgeneralenglishinputpanel.h \
	inputmethod/generalenglish/jgeneralsymbolinputpanel.h \
	inputmethod/chinese/jabstractchinesepanel.h \
	inputmethod/chinese/jgooglepinyin.h \
	inputmethod/chinese/jchineseinputpanel.h \
	inputmethod/chinese/jchinesesymbolinputpanel.h \
	inputmethod/chinese/jsimplifiedchinesecandidatepanel.h \
	inputmethod/chinese/GooglePinYin/atomdictbase.h \
	inputmethod/chinese/GooglePinYin/dictbuilder.h \
	inputmethod/chinese/GooglePinYin/dictdef.h \
	inputmethod/chinese/GooglePinYin/dictlist.h \
	inputmethod/chinese/GooglePinYin/dicttrie.h \
	inputmethod/chinese/GooglePinYin/lpicache.h \
	inputmethod/chinese/GooglePinYin/matrixsearch.h \
	inputmethod/chinese/GooglePinYin/mystdlib.h \
	inputmethod/chinese/GooglePinYin/ngram.h \
	inputmethod/chinese/GooglePinYin/pinyinime.h \
	inputmethod/chinese/GooglePinYin/searchutility.h \
	inputmethod/chinese/GooglePinYin/spellingtable.h \
	inputmethod/chinese/GooglePinYin/spellingtrie.h \
	inputmethod/chinese/GooglePinYin/splparser.h \
	inputmethod/chinese/GooglePinYin/sync.h \
	inputmethod/chinese/GooglePinYin/userdict.h \
	inputmethod/chinese/GooglePinYin/utf16char.h \
	inputmethod/chinese/GooglePinYin/utf16reader.h

FORMS += \
	keyboard/jkeyboardwidget.ui \
	inputmethod/generalenglish/jgeneralenglishinputpanel.ui \
	inputmethod/generalenglish/jgeneralsymbolinputpanel.ui \
	inputmethod/chinese/jchineseinputpanel.ui \
	inputmethod/chinese/jchinesesymbolinputpanel.ui \
	inputmethod/chinese/jsimplifiedchinesecandidatepanel.ui

RESOURCES += \
	qrc/jgvirtualkeyboard.qrc

OTHER_FILES += \
	QtInput.json \
	inputmethod/chinese/GooglePinYin/dict/README.txt \
	inputmethod/chinese/GooglePinYin/dict/pinyinEx.ini

unix {
	LIBS += \
		-L$${DESTDIR}/../lib -lQTECore \
		-L$${DESTDIR}/../lib -lQTEGui

	DESTDIR = $${DESTDIR}/platforminputcontexts
}

win32 {
	LIBS += \
		-L$${DESTDIR}\..\lib -lQTECore \
		-L$${DESTDIR}\..\lib -lQTEGui

	DESTDIR = $${DESTDIR}\platforminputcontexts
}

unix {
	QMAKE_POST_LINK += \
		cp -fP $${PWD}/QtInput.json $${DESTDIR} && \
		cp -rfP $${PWD}/inputmethod/chinese/GooglePinYin/dict $${DESTDIR}/googlepinyin
}

win32 {
	PWD = $$replace(PWD, /, \\)
	DESTDIR = $$replace(DESTDIR, /, \\)

	QMAKE_POST_LINK += \
		xcopy $${PWD}\QtInput.json $${DESTDIR} /y /a && \
		xcopy $${PWD}\inputmethod\chinese\GooglePinYin\dict $${DESTDIR}\googlepinyin /y /e /i
}
